<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jstl/core"
      xmlns:fmt="http://java.sun.com/jstl/fmt"
      xmlns:x="http://java.sun.com/jstl/xml"
      xmlns:fn="http://java.sun.com/jstl/functions"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:gape="http://componentes.gape/component/gape">

	<ui:composition>
		<rich:menuItem icon="/files/save.png" iconDisabled="/files/save.png" submitMode="none" selectClass="menuSelected" iconClass="menuItem" style="padding: 3px 6px;" labelClass="labelMenu">
			<h:commandLink action="#{swot.saveSwot}" value="#{msg.buttonSave}"/>
		</rich:menuItem>		
	
		<rich:dropDownMenu>
			<f:facet name="label">
				<h:panelGroup>
					<h:graphicImage value="/files/new.png" styleClass="pictureMenu"/>
					<h:outputText value="#{msg.buttonInsert}" />
				</h:panelGroup>
			</f:facet>
			
			<rich:menuItem submitMode="none">
				<a4j:commandLink action="#{swot.newItem}" value="#{msg.strength}" oncomplete="javascript:Richfaces.showModalPanel('panelNewItem');" reRender="panelNewItem">
					<f:setPropertyActionListener value="#{1}" target="#{swot.selectedItemType}" />
				</a4j:commandLink>
			</rich:menuItem>
			
			<rich:menuItem submitMode="none">
				<a4j:commandLink action="#{swot.newItem}" value="#{msg.weakness}" oncomplete="javascript:Richfaces.showModalPanel('panelNewItem');" reRender="panelNewItem">
					<f:setPropertyActionListener value="#{2}" target="#{swot.selectedItemType}" />
				</a4j:commandLink>
			</rich:menuItem>

			<rich:menuItem submitMode="none">
				<a4j:commandLink action="#{swot.newItem}" value="#{msg.opportunity}" oncomplete="javascript:Richfaces.showModalPanel('panelNewItem');" reRender="panelNewItem">
					<f:setPropertyActionListener value="#{3}" target="#{swot.selectedItemType}" />
				</a4j:commandLink>
			</rich:menuItem>

			<rich:menuItem submitMode="none">
				<a4j:commandLink action="#{swot.newItem}" value="#{msg.threat}" oncomplete="javascript:Richfaces.showModalPanel('panelNewItem');" reRender="panelNewItem">
					<f:setPropertyActionListener value="#{4}" target="#{swot.selectedItemType}" />
				</a4j:commandLink>
			</rich:menuItem>
		</rich:dropDownMenu>
		
		<rich:dropDownMenu styleClass="filterPerspective">
			<f:facet name="label">
				<h:panelGroup>
					<h:graphicImage value="/files/filter.gif" styleClass="pictureMenu"/>
					<h:outputText value="#{msg.buttonFilterPerspective}" />
				</h:panelGroup>
			</f:facet>
			
			<rich:menuItem submitMode="none" id="menuFiltroPerspectiva" icon="" value="">
				<h:panelGrid columns="1" columnClasses="label">
					<h:selectManyCheckbox value="#{swot.perspectiveSelected}" layout="pageDirection">
						<f:selectItems value="#{swot.listaSIPerspectives}" />
					</h:selectManyCheckbox>
					
					<a4j:commandLink action="#{swot.filterPerspective}" value="Search" styleClass="buttonLink" reRender="strengthTable, weaknessTable, opportunityTable, threatTable"/>
				</h:panelGrid>
			</rich:menuItem>
		</rich:dropDownMenu>
		
		<rich:menuItem submitMode="none" selectClass="menuSelected" style="padding: 3px 6px;" labelClass="labelMenu" iconClass="menuItem">
			<gape:navigationLink mbean="#{'swot'}" metodo="#{'openPerspectiveView'}" value="#{msg.buttonPerspectiveVision}" />
		</rich:menuItem>			
	</ui:composition>

</html>